
#include "stringmap.h"
#include "shape.h"
#include "shapebase.h"
#include "parsersharetool.h"

StringMap::StringMap()
{

}
void StringMap::setqstringname(QString qstr)
{
    m_setstringname=qstr;
}
void StringMap::setqstring(QString qstr)
{
    m_stringmap[m_setstringname]=qstr;
}
void StringMap::addqstring(QString qstr)
{
    m_stringmap[m_setstringname]=m_stringmap[m_setstringname]+qstr;
}

void StringMap::setparserstring(void * parsersharetool)
{
    m_parsertool=(ParserShareTool*)parsersharetool;
}
void StringMap::addparserstring(int inum)
{
    if(nullptr!=m_parsertool)
    {
        m_stringmap[m_setstringname]=m_stringmap[m_setstringname]+m_parsertool->getstring(inum);

    }
}

void StringMap::addresult(void * pshape)
{
    QShape*pashape=(QShape*)pshape;
    if(nullptr!=pshape)
        m_stringmap[m_setstringname]=m_stringmap[m_setstringname]+QString(pashape->result());
}
void StringMap::addstring(const char *pchar)
{
    m_stringmap[m_setstringname]=m_stringmap[m_setstringname]+QString(pchar);
}

void StringMap::setstring(const char *pchar)
{
    m_stringmap[m_setstringname]=QString(pchar);
}
void StringMap::setstringname(const char *pchar)
{
    m_setstringname=QString(pchar);
}
QString StringMap::getstring()
{
    return m_stringmap[m_setstringname];
}
